package com.projectbox.model;

/**
 * The annoucement model class
 * 
 * @author Tony
 */

public class Announcement {

	private Long id;
	private String title;
	private String content;
	private long timeCreated;
	private long timeModified;

	// The admin who create this annoucement
	private Long adminId;
	private User admin;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public long getTimeCreated() {
		return this.timeCreated;
	}

	public void setTimeCreated(long timeCreated) {
		this.timeCreated = timeCreated;
	}

	public long getTimeModified() {
		return this.timeModified;
	}

	public void setTimeModified(long timeModified) {
		this.timeModified = timeModified;
	}

	public Long getAdminId() {
		return this.adminId;
	}

	public void setAdminId(Long adminId) {
		this.adminId = adminId;
	}
	
	public User getAdmin() {
		return this.admin;
	}
	
	public void setAdmin(User admin) {
		this.admin = admin;
	}

	@Override
	public String toString() {
		// return the JSON representation of this object

		return "{" + "\"id\":" + this.id + ", " + "\"title\":\"" + this.title + "\", "
				+ "\"content\":\"" + this.content + "\", "
				+ "\"timeCreated\":\"" + this.timeCreated + "\", "
				+ "\"timeModified\":\"" + this.timeModified
				+ "\", " + "\"admin\":\"" + this.adminId + "\"}";

	}

}
